import request from '@/utils/request'

export function listAllResource() {
  return request({
    url: '/sys/v1/resource/listAll',
    method: 'get'
  })
}

export function listResourceByActive(data) {
  return request({
    url: '/sys/v1/resource/listByActive',
    method: 'get',
    params:data
  })
}

export function listResourceByRoleId(data) {
  return request({
    url: '/sys/v1/resource/listByRoleId',
    method: 'get',
    params:data
  })
}


export function modifyResource(data) {
  return request({
    url: 'sys/v1/resource/modify',
    method: 'post',
    data
  })
}

export function addResource(data) {
  return request({
    url: 'sys/v1/resource/add',
    method: 'post',
    data
  })
}
